#ifndef __CONFIG_H__
#define __CONFIG_H__

#include <stdint.h>

#pragma pack(1)
typedef struct
{
    uint8_t  ip1;
    uint8_t  ip2;
    uint8_t  ip3;
    uint8_t  ip4;
    uint16_t port;
} tcp_info_type_t;

typedef struct
{
    tcp_info_type_t tcp;
    uint16_t        period;
    uint32_t        code;
    uint8_t         valid;
} eeprom_save_t;

typedef enum {
    IDLE = 0,
    CONFIG_INVALID,
		NORMAL,
} config_status_e;

#pragma pack()

extern eeprom_save_t   eeprom_config;
extern config_status_e config_status;

uint8_t read_config(void);
void    save_config(void);
void    config_set_valid(void);
#endif
